perm filename SSPH.CH[UHF,DEK] blob
sn#841763 filedate 1987-06-18 generic text, type T, neo UTF8
% Change file for SDTONE.WEB, computes a "sphere"
@x
reset(bytes_in,input_name,'/B:8')
@y
@z
@x
@!t:eight_bits; {byte of input}
begin for j←-3 to 0 do new_row[j]←0.0;
if i>mm then for j←1 to nn do new_row[j]←0.0
else for j←1 to nn do
begin read(bytes_in,t); new_row[j]←(255.5-t)/256.0;
@y
@!x,@!y,@!z:real; {coordinates of input}
begin @{@=set ERRBLACK nonzero with DDT, to get a constant value!@>@}
for j←-3 to 0 do new_row[j]←0.0;
if i>mm then for j←1 to nn do new_row[j]←0.0
else for j←1 to nn do
begin if err_black=0 then
begin x←(i-120)/111.5; y←(j-120)/111.5; z←1.0-x*x-y*y;
if z<0.0 then new_row[j]←(1250*i+j*j)/1000000
else new_row[j]←(9+x-4*y-8*sqrt(z))/18.0;
end
else new_row[j]←err_black;
@z